<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.u.tool.EventLogUtil" %>
<%@ page import="com.u.eventInfo.*" %>
<%@ page import="java.util.*" %>
<%
	String event_id = request.getParameter("event_id");
	List<EventLog> list = EventLogUtil.GetLogList(event_id);
	EventLog eventLog;
%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" http-equiv="Content-Type" content="width=device-width, initial-scale=1; charset=UTF-8">
		<link rel="stylesheet" href="css/amazeui.min.css">
		<link rel="stylesheet" href="css/Log.css"> 
    	<link href="PhtotSwipe_dist/photoswipe.css" rel="stylesheet">
    	<link href="PhtotSwipe_dist/default-skin.css" rel="stylesheet">
    
		<script src="//s.amazeui.org/assets/2.x/js/jquery.min.js"></script>
		<script src="//cdn.amazeui.org/amazeui/2.7.2/js/amazeui.min.js"></script>
		<script src="PhtotSwipe_dist/photoswipe.min.js"></script>
  		<script src="PhtotSwipe_dist/photoswipe-ui-default.min.js"></script>
		<title>维修日志</title>
		<style>
			.img-responsive{
				max-width: 32%;
				margin-bottom: 4px;
			}
		</style>
	</head>
	<body style="background: rgba(218, 215, 215, 0.55);">
	<header data-am-widget="header" class="am-header am-header-default am-header-fixed" style="background:#dd514c">
	    <div class="am-header-left am-header-nav">
	        <a href="/r/eventdetail.jsp?event_id=<%=event_id %>" class="" >
	            <i class="am-header-icon am-icon-angle-left" style="font-size: 22px;"></i>
	        </a>
	    </div>
	    <h1 class="am-header-title">
	          	维修日志	
	    </h1>
	    <div class="am-header-right am-header-nav">
          	<a data-am-modal="{target: '#newLog'}" href="#right-link" class="">
           	     <i class="am-icon-plus-square-o am-icon-md"></i>
          	</a>
      	</div>
	</header>
	<%
		for(int i=0;i<list.size();i++){
			eventLog = list.get(i);
			try{
				eventLog.getPic_addr().length();
			}catch(NullPointerException e) {
				eventLog.setPic_addr("0");
			}
			String[] pic_addr_buf = eventLog.getPic_addr().split(",");
			String[] pic_addr = new String[10];
			for(int j=0;j<pic_addr_buf.length;j++){
				pic_addr[j] = "http://bankproject.oss-cn-shenzhen.aliyuncs.com/" + pic_addr_buf[j];
			}
			for(int j=pic_addr_buf.length;j<10;j++){
				pic_addr[j] = "";
			}
			int length = pic_addr_buf.length - 1;
			String date = eventLog.getDate();
			String date_time = date.substring(5,10)+" "+date.substring(11);
			String margin1="10px",margin2="10px",margin3="10px";
			if(pic_addr[1].equals("")){
				margin1 = "0px";
			}
			if(pic_addr[4].equals("")){
				margin2 = "0px";
			}
			if(pic_addr[7].equals("")){
				margin3 = "0px";
			}
	%>
	<div class="card-container">
		<div class="header-container">
			<div class="station-name">
				<p><%=eventLog.getPoster_name() %></p>
			</div>
			<div class="time">
				<p><%=date_time %></p>
			</div>
		</div>
		<div class="content-container">
			<div class="text_container">
				<p><%=eventLog.getContent() %></p>
			</div>
			<div class="section section--head">
				
			    <div class="row">
			      <div id="demo-test-gallery" class="demo-gallery" data-pswp-uid="1">
					<%
						for(int k=1;k<pic_addr_buf.length;k++){
							
					%>
				
			        <a href="<%=pic_addr[k] %>" data-size="1600x1600" data-med="<%=pic_addr[k] %>" data-med-size="1024x1024" data-author="Folkert Gorter" class="demo-gallery__img--main">
						<img src="<%=pic_addr[k] %>" class="img-responsive" />
			        </a>
			        
			        <%
						}
			        %>

			      </div>
			    </div>
			</div>
		</div>
	</div>
	<%
		}
	%>
	
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="newLog">
	  	<div class="am-modal-dialog">
	   	 	<div class="am-modal-hd"  style="background: #f04f4f;color: white;">添加
	      		<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
	    	</div>
	    	<div class="am-modal-bd" style="margin-top: 10px;">
	     		<form  action="/r/NewEventLog" method="post" class="am-form">
	     			<div class="am-form-group" style="text-align: -webkit-auto;">
	     				<input name="event_id" value="<%=event_id %>" style="display:none"/>
	     				<label>内容</label>
	     				<textarea name="context" class="" rows="5" id="doc-ta-1" required="required"></textarea>
	     				<label>图片详情(最多选择9张)</label>
	     				<input name="pic_address" type="text" name="fileAddr" id="fileAddr" style="display: none;"/>
	     				<input type="text" id='dirname' style="display: none;" size=50>
	     				<div id="localImag1" class="am-g">
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_1" class="am-img-responsive" src=""/>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_2" class="am-img-responsive" src=""/>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_3" class="am-img-responsive" src=""/>
	     					</div>
	     				</div>
	     				<div id="localbtn1" class="am-g">
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_1" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,1)">删除</a>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_2" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,2)">删除</a>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_3" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,3)">删除</a>
	     					</div>
	     				</div>
	     				
	     				<div id="localImag2" class="am-g" style="margin-top: 10px;">
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_4" class="am-img-responsive" src=""/>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_5" class="am-img-responsive" src=""/>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_6" class="am-img-responsive" src=""/>
	     					</div>
	     				</div>
	     				<div id="localbtn1" class="am-g">
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_4" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,4)">删除</a>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_5" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,5)">删除</a>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_6" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,6)">删除</a>
	     					</div>
	     				</div>
	     				
	     				<div id="localImag3" class="am-g" style="margin-top: 10px;">
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_7" class="am-img-responsive" src=""/>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_8" class="am-img-responsive" src=""/>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<img id="preImg_9" class="am-img-responsive" src=""/>
	     					</div>
	     				</div>
	     				<div id="localbtn1" class="am-g">
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_7" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,7)">删除</a>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_8" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,8)">删除</a>
	     					</div>
	     					<div class="am-u-sm-4" style="padding-left: 0.5rem;padding-right: 0.5rem;">
	     						<a id="prebtn_9" class="delbtn" style="width: 100%;display: none;" onclick="remove_upload_img(uploader,9)">删除</a>
	     					</div>
	     				</div>
	     				
	     				<div id="container" style="margin-top: 5px;">
							<a id="selectfiles" href="javascript:void(0);" class='btn'>选择文件</a>
							<a id="postfiles" href="javascript:void(0);" class='btn' style="display: none;">开始上传</a>
						</div>
	     				
	     				<a class="btn" style="margin-top: 10px;width: 100%;" onclick="Img_upload()">提交</a>
	     				<button id="submitBtn" type="submit" style="display: none;"></button>
	     			</div>
	     		</form>
	    	</div>
	  	</div>
	</div>
	
	<div id="gallery" class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="pswp__bg" style=""></div>

        <div class="pswp__scroll-wrap">

          <div class="pswp__container" style="transform: translate3d(0px, 0px, 0px);">
			<div class="pswp__item" style="display: block; transform: translate3d(-358px, 0px, 0px);"><div class="pswp__zoom-wrap" style="transform: translate3d(0px, 234px, 0px) scale(1);"><img class="pswp__img" src="https://farm4.staticflickr.com/3920/15008465772_383e697089_b.jpg" style="opacity: 1; width: 320px; height: 213px;"></div></div>
			<div class="pswp__item" style="transform: translate3d(0px, 0px, 0px);"><div class="pswp__zoom-wrap" style="transform: translate3d(18px, 48px, 0px) scale(0.340625);"><img class="pswp__img pswp__img--placeholder" src="https://farm4.staticflickr.com/3894/15008518202_b016d7d289_m.jpg" style="width: 320px; height: 320px; display: none;"><img class="pswp__img" src="https://farm4.staticflickr.com/3894/15008518202_b016d7d289_b.jpg" style="display: block; width: 320px; height: 320px;"></div></div>
			<div class="pswp__item" style="display: block; transform: translate3d(358px, 0px, 0px);"><div class="pswp__zoom-wrap" style="transform: translate3d(0px, 234px, 0px) scale(1);"><img class="pswp__img" src="https://farm6.staticflickr.com/5591/15008867125_68a8ed88cc_b.jpg" style="opacity: 1; width: 320px; height: 213px;"></div></div>
          </div>

          <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

				<div class="pswp__counter">1 / 5</div>

				<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

				<button class="pswp__button pswp__button--share" title="Share"></button>

				<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

				<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

				<div class="pswp__preloader">
					<div class="pswp__preloader__icn">
					  <div class="pswp__preloader__cut">
					    <div class="pswp__preloader__donut"></div>
					  </div>
					</div>
				</div>
            </div>


			<!-- <div class="pswp__loading-indicator"><div class="pswp__loading-indicator__line"></div></div> -->

            <div class="pswp__share-modal pswp__single-tap pswp__share-modal--hidden">
	            <div class="pswp__share-tooltip"><a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fphotoswipe.com%2F%23%26gid%3D1%26pid%3D1" target="_blank" class="pswp__share--facebook">Share on Facebook</a><a href="https://twitter.com/intent/tweet?text=This%20is%20dummy%20caption.&amp;url=http%3A%2F%2Fphotoswipe.com%2F%23%26gid%3D1%26pid%3D1" target="_blank" class="pswp__share--twitter">Tweet</a><a href="http://www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fphotoswipe.com%2F%23%26gid%3D1%26pid%3D1&amp;media=https%3A%2F%2Ffarm4.staticflickr.com%2F3894%2F15008518202_b016d7d289_b.jpg&amp;description=This%20is%20dummy%20caption." target="_blank" class="pswp__share--pinterest">Pin it</a><a href="https://farm4.staticflickr.com/3894/15008518202_b016d7d289_b.jpg" target="_blank" class="pswp__share--download" download="">Download image</a></div>
	        </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>
            <div class="pswp__caption">
              <div class="pswp__caption__center">This is dummy caption.<br><small>Photo: Folkert Gorter</small></div>
            </div>
          </div>

        </div>


    </div>
	
	
	
	</body>
	<script type="text/javascript" src="js/lib/crypto1/crypto/crypto.js"></script>
	<script type="text/javascript" src="js/lib/crypto1/hmac/hmac.js"></script>
	<script type="text/javascript" src="js/lib/crypto1/sha1/sha1.js"></script>
	<script type="text/javascript" src="js/lib/base64.js"></script>
	<script type="text/javascript" src="js/lib/plupload-2.1.2/js/plupload.full.min.js"></script>
	<script type="text/javascript" src="js/upload2.js"></script>
	<script src="js/GetUser.js" type="text/javascript"></script>
	<script type="text/javascript">
	var imgupload = false;
		function Img_upload(){
			var description = document.getElementsByName("context")[0].value;
			if((description == "") || (description == null)){
				alert("请输入内容");
			}else{
				if(uploader.files.length >= 1){
					document.getElementById("postfiles").click();
					if(imgupload){
						document.getElementById("submitBtn").click();
					}
					imgupload = true;
				}else{
					document.getElementById("submitBtn").click();
				}
			}
		}
		
		getUser();
	</script>
	
	  <script type="text/javascript">
    (function() {

		var initPhotoSwipeFromDOM = function(gallerySelector) {

			var parseThumbnailElements = function(el) {
			    var thumbElements = el.childNodes,
			        numNodes = thumbElements.length,
			        items = [],
			        el,
			        childElements,
			        thumbnailEl,
			        size,
			        item;

			    for(var i = 0; i < numNodes; i++) {
			        el = thumbElements[i];

			        // include only element nodes 
			        if(el.nodeType !== 1) {
			          continue;
			        }

			        childElements = el.children;

			        size = el.getAttribute('data-size').split('x');

			        // create slide object
			        item = {
						src: el.getAttribute('href'),
						w: parseInt(size[0], 10),
						h: parseInt(size[1], 10),
						author: el.getAttribute('data-author')
			        };

			        item.el = el; // save link to element for getThumbBoundsFn

			        if(childElements.length > 0) {
			          item.msrc = childElements[0].getAttribute('src'); // thumbnail url
			          if(childElements.length > 1) {
			              item.title = childElements[1].innerHTML; // caption (contents of figure)
			          }
			        }


					var mediumSrc = el.getAttribute('data-med');
		          	if(mediumSrc) {
		            	size = el.getAttribute('data-med-size').split('x');
		            	// "medium-sized" image
		            	item.m = {
		              		src: mediumSrc,
		              		w: parseInt(size[0], 10),
		              		h: parseInt(size[1], 10)
		            	};
		          	}
		          	// original image
		          	item.o = {
		          		src: item.src,
		          		w: item.w,
		          		h: item.h
		          	};

			        items.push(item);
			    }

			    return items;
			};

			// find nearest parent element
			var closest = function closest(el, fn) {
			    return el && ( fn(el) ? el : closest(el.parentNode, fn) );
			};

			var onThumbnailsClick = function(e) {
			    e = e || window.event;
			    e.preventDefault ? e.preventDefault() : e.returnValue = false;

			    var eTarget = e.target || e.srcElement;

			    var clickedListItem = closest(eTarget, function(el) {
			        return el.tagName === 'A';
			    });

			    if(!clickedListItem) {
			        return;
			    }

			    var clickedGallery = clickedListItem.parentNode;

			    var childNodes = clickedListItem.parentNode.childNodes,
			        numChildNodes = childNodes.length,
			        nodeIndex = 0,
			        index;

			    for (var i = 0; i < numChildNodes; i++) {
			        if(childNodes[i].nodeType !== 1) { 
			            continue; 
			        }

			        if(childNodes[i] === clickedListItem) {
			            index = nodeIndex;
			            break;
			        }
			        nodeIndex++;
			    }

			    if(index >= 0) {
			        openPhotoSwipe( index, clickedGallery );
			    }
			    return false;
			};

			var photoswipeParseHash = function() {
				var hash = window.location.hash.substring(1),
			    params = {};

			    if(hash.length < 5) { // pid=1
			        return params;
			    }

			    var vars = hash.split('&');
			    for (var i = 0; i < vars.length; i++) {
			        if(!vars[i]) {
			            continue;
			        }
			        var pair = vars[i].split('=');  
			        if(pair.length < 2) {
			            continue;
			        }           
			        params[pair[0]] = pair[1];
			    }

			    if(params.gid) {
			    	params.gid = parseInt(params.gid, 10);
			    }

			    return params;
			};

			var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
			    var pswpElement = document.querySelectorAll('.pswp')[0],
			        gallery,
			        options,
			        items;

				items = parseThumbnailElements(galleryElement);

			    // define options (if needed)
			    options = {

			        galleryUID: galleryElement.getAttribute('data-pswp-uid'),

			        getThumbBoundsFn: function(index) {
			            // See Options->getThumbBoundsFn section of docs for more info
			            var thumbnail = items[index].el.children[0],
			                pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
			                rect = thumbnail.getBoundingClientRect(); 

			            return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
			        },

			        addCaptionHTMLFn: function(item, captionEl, isFake) {
						if(!item.title) {
							captionEl.children[0].innerText = '';
							return false;
						}
						captionEl.children[0].innerHTML = item.title +  '<br/><small>Photo: ' + item.author + '</small>';
						return true;
			        },
					
			    };


			    if(fromURL) {
			    	if(options.galleryPIDs) {
			    		// parse real index when custom PIDs are used 
			    		// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
			    		for(var j = 0; j < items.length; j++) {
			    			if(items[j].pid == index) {
			    				options.index = j;
			    				break;
			    			}
			    		}
				    } else {
				    	options.index = parseInt(index, 10) - 1;
				    }
			    } else {
			    	options.index = parseInt(index, 10);
			    }

			    // exit if index not found
			    if( isNaN(options.index) ) {
			    	return;
			    }



				var radios = document.getElementsByName('gallery-style');
				for (var i = 0, length = radios.length; i < length; i++) {
				    if (radios[i].checked) {
				        if(radios[i].id == 'radio-all-controls') {

				        } else if(radios[i].id == 'radio-minimal-black') {
				        	options.mainClass = 'pswp--minimal--dark';
					        options.barsSize = {top:0,bottom:0};
							options.captionEl = false;
							options.fullscreenEl = false;
							options.shareEl = false;
							options.bgOpacity = 0.85;
							options.tapToClose = true;
							options.tapToToggleControls = false;
				        }
				        break;
				    }
				}

			    if(disableAnimation) {
			        options.showAnimationDuration = 0;
			    }

			    // Pass data to PhotoSwipe and initialize it
			    gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);

			    // see: http://photoswipe.com/documentation/responsive-images.html
				var realViewportWidth,
				    useLargeImages = false,
				    firstResize = true,
				    imageSrcWillChange;

				gallery.listen('beforeResize', function() {

					var dpiRatio = window.devicePixelRatio ? window.devicePixelRatio : 1;
					dpiRatio = Math.min(dpiRatio, 2.5);
				    realViewportWidth = gallery.viewportSize.x * dpiRatio;


				    if(realViewportWidth >= 1200 || (!gallery.likelyTouchDevice && realViewportWidth > 800) || screen.width > 1200 ) {
				    	if(!useLargeImages) {
				    		useLargeImages = true;
				        	imageSrcWillChange = true;
				    	}
				        
				    } else {
				    	if(useLargeImages) {
				    		useLargeImages = false;
				        	imageSrcWillChange = true;
				    	}
				    }

				    if(imageSrcWillChange && !firstResize) {
				        gallery.invalidateCurrItems();
				    }

				    if(firstResize) {
				        firstResize = false;
				    }

				    imageSrcWillChange = false;

				});

				gallery.listen('gettingData', function(index, item) {
				    if( useLargeImages ) {
				        item.src = item.o.src;
				        item.w = item.o.w;
				        item.h = item.o.h;
				    } else {
				        item.src = item.m.src;
				        item.w = item.m.w;
				        item.h = item.m.h;
				    }
				});

			    gallery.init();
			};

			// select all gallery elements
			var galleryElements = document.querySelectorAll( gallerySelector );
			for(var i = 0, l = galleryElements.length; i < l; i++) {
				galleryElements[i].setAttribute('data-pswp-uid', i+1);
				galleryElements[i].onclick = onThumbnailsClick;
			}

			// Parse URL and open gallery if it contains #&pid=3&gid=1
			var hashData = photoswipeParseHash();
			if(hashData.pid && hashData.gid) {
				openPhotoSwipe( hashData.pid,  galleryElements[ hashData.gid - 1 ], true, true );
			}
		};

		initPhotoSwipeFromDOM('.demo-gallery');

	})();

	</script>



    
    

    



    <!-- analytics -->
    <script>
    (function() {

      var url = window.location.href.toLowerCase();
      if(url.indexOf('photoswipe') === -1) {
        return;
      } 

      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-49016964-1', 'photoswipe.com');
      ga('send', 'pageview');

      function trackJavaScriptError(e) {
        e = e || window.event;
        if(!e || !e.message || !e.lineno){ 
          return true; 
        }
        var errMsg = e.message;
        var errSrc = e.filename + ': ' + e.lineno;
        ga('send', 'event', 'JavaScript Error', errMsg, errSrc, { 'nonInteraction': 1 });
      }

      if (window.addEventListener) {
        window.addEventListener('error', trackJavaScriptError, false);
      } else if (window.attachEvent) {
        window.attachEvent('onerror', trackJavaScriptError);
      } else {
        window.onerror = trackJavaScriptError;
      }


      (function (d, w, c) {
          (w[c] = w[c] || []).push(function() {
              try {
                  w.yaCounter24301471 = new Ya.Metrika({id:24301471,
                          webvisor:false,
                          clickmap:false});
              } catch(e) { }
          });

          var n = d.getElementsByTagName("script")[0],
              s = d.createElement("script"),
              f = function () { n.parentNode.insertBefore(s, n); };
          s.type = "text/javascript";
          s.async = true;
          s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";

          if (w.opera == "[object Opera]") {
              d.addEventListener("DOMContentLoaded", f, false);
          } else { f(); }
      })(document, window, "yandex_metrika_callbacks");

    })();
    </script>
	
</html>
